﻿<%@ Control Language="C#" AutoEventWireup="True" CodeBehind="tabOrders.ascx.cs" Inherits="CustomerService.OrderTab" %>
<%@ Register TagPrefix="csl" Src="~/tabOrderDetail.ascx" TagName="OrderDetailsTab" %>
<%@ Register TagPrefix="csl" Src="~/tabShipTo.ascx" TagName="ShipToDetailsTab" %>
<%@ Register TagPrefix="csl" Src="~/tabRefundsReturns.ascx" TagName="RefundsReturnsTab" %>
<%@ Register TagPrefix="csl" Src="~/tabTracking.ascx" TagName="TrackingTab" %>
<%@ Register TagPrefix="csl" Src="~/tabTransactions.ascx" TagName="TransactionsTab" %>
<%@ Register TagPrefix="csl" Src="~/tabOrderSourceID.ascx" TagName="OrderSourceIDsTab" %>
<%@ Register TagPrefix="csl" Src="~/tabPayment.ascx" TagName="tabPayment" %>

<asp:UpdatePanel ID="UpdatePanel4" runat="server">
<ContentTemplate>
<table cellpadding="0" cellspacing="0" style="vertical-align: top;">
    <tr>
        <td valign="top">
            <asp:Button ID="btnAddNewOrder" runat="server" Text="Add New Order" 
                onclick="btnAddNewOrder_Click" /><br />
                <asp:ListView ID="lvOrderList" runat="server" OnSelectedIndexChanged="OrderListSelectedIndexChanged" OnSelectedIndexChanging="OrderListSelectedIndexChanging" >
                    <LayoutTemplate>
                        <div style="overflow:auto;max-height:400px;">
                        <table>
                            <tr id="itemPlaceholder" runat="server"></tr>
                        </table>
                        </div>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <tr runat="server">
                            <td style="border-bottom: 1px solid black;">
                                <asp:LinkButton ID="btnSelectOrder" runat="server" Text='<%# Eval("OrderID") %>' CommandName="Select" /><br />
                                <%# Eval("OrderListInfo") %><br />
                            </td>
                        </tr>
                    </ItemTemplate>
                    <SelectedItemTemplate>
                        <tr id="Tr1" runat="server">
                            <td style="border-bottom: 1px solid black; background: yellow;">
                                <asp:Panel ID="pnlSelectedItem" runat="server">
                                    <%# Eval("OrderID") %><br />
                                    <%# Eval("OrderListInfo") %><br />
                                </asp:Panel>
                                <asp:HoverMenuExtender ID="hmeSelectedItem"
                                     runat="server"
                                     TargetControlID="pnlSelectedItem"
                                     PopupControlID="PopupMenu"
                                     PopupPosition="Right" />
                            </td>
                        </tr>
                    </SelectedItemTemplate>
                </asp:ListView>
        </td>
        <td valign="top">
            <asp:TabContainer ID="TabContainer1" runat="server">
                <asp:TabPanel ID="TabPanelDetails" runat="server" HeaderText="Details">
                    <ContentTemplate>
                        <csl:OrderDetailsTab ID="tabOrderDetail" runat="server" />
                    </ContentTemplate>
                </asp:TabPanel>
                <asp:TabPanel ID="TabPayment" runat="server" HeaderText="Payment">
                    <ContentTemplate>
                        <csl:tabPayment id="tabPayment1" runat="server" />
                    </ContentTemplate>
                </asp:TabPanel>
                <asp:TabPanel ID="TabPanelShipping" runat="server" HeaderText="Shipping">
                    <ContentTemplate>
                        <csl:ShipToDetailsTab id="tabShipTo" runat="server" />
                    </ContentTemplate>
                </asp:TabPanel>
                <asp:TabPanel ID="TabPanelTracking" runat="server" HeaderText="Tracking">
                    <ContentTemplate>
                        <csl:TrackingTab id="tabTracking" runat="server" />
                    </ContentTemplate>
                </asp:TabPanel>
                <asp:TabPanel ID="tabPanelRefunds" runat="server" HeaderText="Refunds / Returns">
                    <ContentTemplate>
                        <csl:RefundsReturnsTab ID="tabRefundsReturns" runat="server" />
                    </ContentTemplate>
                </asp:TabPanel>
                <asp:TabPanel ID="tabPanelTransactions" runat="server" HeaderText="Transactions">
                    <ContentTemplate>
                        <csl:TransactionsTab ID="tabTransactions" runat="server" />
                    </ContentTemplate>
                </asp:TabPanel>
                <asp:TabPanel ID="TabPanelPromotions" runat="server" HeaderText="Promotions">
                </asp:TabPanel>
                <asp:TabPanel ID="TabPanelCampaigns" runat="server" HeaderText="Campaigns">
                </asp:TabPanel>
                <asp:TabPanel ID="TabPanelOrderSourceIDs" runat="server" HeaderText="Source IDs">
                    <ContentTemplate>
                        <csl:OrderSourceIDsTab ID="tabOrderSourceIDs" runat="server" />
                    </ContentTemplate>
                </asp:TabPanel>
            </asp:TabContainer>
        </td>
    </tr>
</table>
<asp:Panel ID="PopupMenu" runat="server" CssClass="popupMenu">
    <asp:LinkButton ID="btnCopy" runat="server" CommandName="Copy" Text="Repeat as new order" OnCommand="PopupCommand_Command" />
    <div style='<%= ShowButton("Hold")%>'>
        <br />
        <asp:LinkButton ID="btnHold" runat="server" CommandName="Hold" Text="Hold" OnCommand="PopupCommand_Command" />
    </div>
    <div style='<%= ShowButton("Release")%>'>
        <br />
        <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Release" Text="Release" OnCommand="PopupCommand_Command" />
    </div>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
